//package com.example.cloud.springcloudvault.config;
//
//import org.springframework.context.annotation.Configuration;
//
///**
// * 用基于Java的bean元数据注册Spring Vault对象
// */
//@Configuration
//public class VaultConfig extends AbstractVaultConfiguration {
//
////    @Value("${vault.token}")
////    String token;
//
////    @Value("${vault.uri}")
////    URI vaultUri;
//
//    /**
//     * Specify an endpoint for connecting to Vault.
//     */
//    @Override
//    public VaultEndpoint vaultEndpoint() {
////        创建一个VaultEndpoint默认指向的新点https://localhost:8200。
//        return new VaultEndpoint();
////        return VaultEndpoint.from(vaultUri);
//    }
//
//    /**
//     * Configure a client authentication.
//     * Please consider a more secure authentication method
//     * for production use.
//     */
////    @Override
////    public ClientAuthentication clientAuthentication() {
//////        String property = getEnvironment().getProperty("vault.token");
////        return new TokenAuthentication(token);
////    }
//    @Override
//    public ClientAuthentication clientAuthentication() {
//        return new ClientCertificateAuthentication(restOperations());
//    }
//}